# Maintainer:   Bartłomiej Piotrowski <barthalion@gmail.com>
# Contributor: Daniel Micay <danielmicay@gmail.com>
# Contributor: stonecrest <stonecrestATgmailDOTcom>

pkgname=mingetty
pkgver=1.08
pkgrel=3
pkgdesc="A minimal getty which allows automatic logins."
arch=('i686' 'x86_64')
url="http://sourceforge.net/projects/mingetty"
license=('GPL')
depends=('glibc')
md5sums=('2a75ad6487ff271424ffc00a64420990'
         'b1bcb0668c34d4981e3acddc3990dfdb')
source=(http://downloads.sourceforge.net/sourceforge/mingetty/$pkgname-$pkgver.tar.gz
        $pkgname-utf8.patch)

build() {
  cd "$srcdir/$pkgname-$pkgver"
  patch $pkgname.c ../$pkgname-utf8.patch
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  install -Dm755 $pkgname "$pkgdir/sbin/$pkgname"
  install -Dm644 $pkgname.8 "$pkgdir/usr/share/man/man8/$pkgname.8"
}
